package com.xq.jedispool;

import com.xq.jedispool.utlis.JedisPoolUtil;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

/**
 * @author xq
 * @version 1.0
 * @date 2021/4/28 12:59
 * @description 测试jedispool
 */
public class TestJedisPool {
    public static void main(String[] args) {
        JedisPool jedisPool = JedisPoolUtil.getJedisPoolInstance();
        Jedis jedis = null;
        try {
            jedis = jedisPool.getResource();
            jedis.set("k992","v11");
            System.out.println(jedis.get("k992"));
        }finally {
            JedisPoolUtil.release(jedisPool,jedis);
        }
    }
}
